package chapter07

/**
  * 集合之不可变Set
  */
object Test06_ImmutableSet {
  def main(args: Array[String]): Unit = {
    val set = Set.apply(13, 13, 14, 14, 15, 16, 17)
    println(set)
    // 添加
    val set1 = set + 9
    // 合并
    val set2 = set ++ set1 +10
    println(set1)
    println(set2)
    // 删除
    val set3 = set2 - 10 + 11
    println(set3)
  }
}
